getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Thu, 8 Dec 2016 14:47:46 +0000 (14:47 +0000)
committerRaspbian forward porter <root@raspbian.org>
Thu, 8 Dec 2016 14:47:46 +0000 (14:47 +0000)
commit8631e617a5b3a7313cd613ea870fa16bfb58c13b
tree7a562024affff66a898207f2e705fa6e08cc6844
parentacb79a957aecaba8ca575963036bd6464000a418
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c